# -*- coding: UTF-8 -*-
# @Time : 2022-02-13 23:31
# @User：My.
# @File : Test_Operate.py
from Base.ExcelData import Data
from Utils.LogUtil import my_log
from Conf import conf
import pytest
from TestCase.operate.Operate import Operate
from Base.Start import Start
# 日志
log = my_log('Test_Operate')
data = Data(conf.data_file)
run_list = data.run_list()


class Test_Operate:

    def setup(self):
        self.driver = Start()

    @pytest.mark.parametrize('run_case', run_list)
    def test_run(self, run_case):
        # self.driver = webdriver.Firefox(executable_path="D:\geckodriver.exe")
        # self.driver.get("")
        # self.driver = Start
        log.info('执行测试用例内容{0}'.format(run_case))
        Operate(self.driver).step(data, run_case)

    def teardown(self):
        self.driver.quit()

